﻿@using System.Data;
@using DTcms.Common;
@model DTcms.Model.BaseModel
@{
    var m = (DTcms.Model.article_category)Model.info["category"];
    var siteModel = (DTcms.Model.site_channel)Model.info["site_model"];
    ViewBag.Title = m.title + "-" + Model.site.name;
    ViewBag.Keywords = m.seo_keywords;
    ViewBag.Description = m.seo_description;
    string category_nav = Html.get_category_menu("photo_list", m.id, ">");
}
@section HeaderContent{

}
<!--当前位置-->
<div class="section">
    <div class="location">
        <span>当前位置：</span>
        <a href="@Html.linkurl("index")">首页</a> &gt;
        <a href="@Html.linkurl("video")">图片分享</a>
        @Html.Raw(category_nav)
    </div>
</div>
<!--/当前位置-->
<!--/分类导航-->
<div class="section">
    <div class="wrapper clearfix">
        <div class="screen-box">
            <ul>
                <h4>筛选类别：</h4>
                <li class="@(m.id==0?"selected":"")"><a href="@Html.linkurl("photo_list",0)">全部</a></li>
                @{
                    int currCategoryId = m.id;
                    if (m.parent_id > 0)
                    {
                        currCategoryId = m.parent_id;
                    }
                    var categoryList = Html.get_category_child_list(siteModel.name, currCategoryId,0);
                    foreach (var dr in categoryList)
                    {
                        <li class="@(dr.id==m.id?"selected":"")"><a href="@Html.linkurl("photo_list",dr.id)">@dr.title</a></li>
                    }
                }
            </ul>
        </div>
    </div>
</div>
<!--/分类导航-->
<!--内容列表-->
<div class="section">
    <div class="wrapper clearfix">
        <ul class="img-list">
            @{
                DataTable photoList = Html.get_article_list(siteModel.name, m.id, Model.pagesize, Model.page, "status=0", out Model.totalcount, out Model.pagelist, "photo_list", m.id, "__id__");
                foreach (DataRow dr in photoList.Rows)
                {
                    <li>
                        <a title="@dr["title"]" href="@Html.linkurl("photo_show",dr["id"])">
                            <div class="img-box"><img src="@dr["img_url"]" /></div>
                            <div class="abs-bg"></div>
                            <div class="remark">
                                <h3>@dr["title"]</h3>
                                <p>@Html.datetostr(dr["add_time"], "yyyy-MM-dd")</p>
                            </div>
                        </a>
                    </li>
                }
            }
        </ul>
        <!--页码列表-->
        <div class="page-box" style="margin: 15px 0px 0px;">
            <div class="pageNavigation">@Html.Raw(Model.pagelist)</div>
        </div>
        <!--/页码列表-->
    </div>
</div>
<!--/分类推荐-->
@section Scripts{

}
